<?php
/**
 * IMMOPHP
 * Affiche la page passer par l URL
 * */
require 'kernel/common.php';

if(!$id = retrieve('GET','page',true)) redirect('index.php');

$Page = $db->sql_query("SELECT name, contenue FROM immo_page WHERE id = '". $id ."'",'OBJECT'); 

$smarty->display($fichier_theme_header);
$smarty->assign('titre_site', $setting['titre_site'] . ' - ' . $Page->name);

$smarty->assign('page', stripslashes($Page->contenue) );  
$smarty->display('page.tpl', $id);
    
require_once 'kernel/footer.php';
?>